home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-28 | 2.0 KB | 107 lines | [TEXT/ExPr] |
- *
- * This script organizes a folder in the following way
- * the view is small icon
- * the items are organized into four different groups
- * 1. Applications and application aliases
- * 2. Files and their aliases
- * 3. Folders and their aliases
- * 4. Volume aliases
- * the different groups are displayed above each other
- * each group has three columns
- *
- if #sys < '0700'
- display 'This script requires System 7'
- exit
- end
- *
- * Select the folder
- *
- dir
- test (#ret) exit
- *
- * Create an alias for the folder
- *
- b = 1
- alias b[0] =,
- *
- * Set the view for the window
- * Close the Finder window and wait a bit for it to save results
- * This is to ensure that the volume info is the same as the Finder info
- *
- finder view,b[0],small
- finder close,b[0]
- wait none 5
- *
- * Now scan the files in this folder and build the list
- *
- i = 0
- total = 0
- count[1] = 0
- count[2] = 0
- count[3] = 0
- count[4] = 0
- do
- inc i
- file a = i
- test (#ret) quit
- if (#file(inv))
- beep
- display 'invisible:'a
- cycle
- end
- if (#file(locked))
- accept tt,'Unlock 'a'?'
- if #ret = 0
- change locked=0
- info
- lock = 1
- else
- display 'locked:'a
- cycle
- end
- else
- lock = 0
- end
- if #file(type) = 'APPL' | #file(type) = 'adrp'
- x = 1
- else if #file(type) = 'srvr' | #file(type) = 'flpy' | #file(type) = 'hdsk'
- x = 4
- else if #file(type) = 'DIR ' | #file(cre) = 'MACS'
- x = 3
- else
- x = 2
- end
- inc count[x]
- inc total
- num[x][count[x]] = i
- lockit[x][count[x]] = lock
- ver[x][count[x]] = #file(ver)
- hor[x][count[x]] = #file(hor)
- name[x][count[x]] = a
- display #f(total,3,0)':'#file(type)':'#file(cre)':'a
- end
- *
- * Open the Finder window
- *
- front sign='MACS'
- finder show,b[0]
- *
- v = -16
- block = 0
- do while block < 4
- inc block
- test (count[block] = 0) cycle
- v = v + 20
- rows = (count[block] + 2)/3
- j = 0
- do while j < count[block]
- tv = v + 20*(j%rows)
- h = 125*(j/rows)
- inc j
- alias b[1] = ,name[block][j]
- finder move,b,ver=(tv-ver[block][j]),hor=(h-hor[block][j])
- end
- v = v + 20*rows
- end
-
- finder sizewindow,b[0],height=v+35,width=395